<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>39 | 个人信息</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript">
	
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 

</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/lines.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<!-- Graph JavaScript -->
<script src="js/d3.v3.js"></script>
<script src="js/rickshaw.js"></script>
<style type="text/css">
.myspan {
	color: red;
}
</style>
<script src="js/validate.js"></script>
<script src="js/pruduct_number.js"></script>
<script src="js/sub_lifecycle.js"></script>
<script type="text/javascript">
	function fun() {
		var pattern = /^[a-zA-Z]\w{5,17}$/;
		var password = document.getElementById("password").value;
		var repassword = document.getElementById("repassword").value;
		if(!pattern.test(password) || !pattern.test(repassword)) {
			$("#b1").hide();
			$("#span_button").text("密码格式不对");
			return false;
		} else {
			$("#b1").show();
			$("#span_button").text("");
		}
		if(password != repassword) {
			$("#b1").hide();
			$("#span_button").text("两次密码输入不一致");
			return false;
		} else {
			$("#b1").show();
			$("#span_button").text("");
		}
		return true;
	}
</script>

</head>
<body>
	<div id="wrapper">
		<!-- Navigation -->
		<!-- left.jsp -->
		<jsp:include page="left.jsp"></jsp:include>
		<div id="page-wrapper">

			<div class="graphs">
				<div class="xs">
					<h3>修改密码</h3>
					<form name="modify_pwd" method="post" action="modifypwd" class="form-horizontal">
								<div class="form-group">
									<input type="hidden" name="id" value="${sessionScope.user.id }">
									<label for="password" class="col-sm-2 control-label">新密码</label>
									<div class="col-sm-2">
										<input type="text" onblur="fun();" name="password" class="form-control1" id="password">
									</div>
									<span id="span_password" class="myspan"></span>
								</div>
								
								<div class="form-group">
									<label for="repassword" class="col-sm-2 control-label">重复密码</label>
									<div class="col-sm-2">
										<input type="text" onblur="fun();" name="repassword" class="form-control1" id="repassword">
									</div>
									<span id="span_repwd" class="myspan"></span>
								</div>
								<center>
									<input id="b1" type="button" class="btn btn-primary" value="修改" onclick="if(fun()) modify_pwd.submit();"/>
									<span id="span_button" style="color:red;"></span>
								</center>
					</form>

				</div>

			</div>
		</div>
		<div class="copy_layout">
			<jsp:include page="copyright.jsp"></jsp:include>
		</div>
	</div>

	</div>
	<!-- /#page-wrapper -->
	</div>
	<!-- /#wrapper -->
	<!-- Bootstrap Core JavaScript -->
	<script src="js/bootstrap.min.js"></script>
</body>
</html>
